package org.cn.osiris.pet.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.cn.osiris.basic.domain.BaseDomain;
import org.cn.osiris.org.domain.Department;
import org.cn.osiris.org.domain.Shop;
import org.cn.osiris.user.domain.User;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 实体类：
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Pet extends BaseDomain {

    private String name;
    private BigDecimal costprice;
    private BigDecimal saleprice;
    /**
     * 类型id
     */
    private Long typeId;
    private String resources;
    /**
     * 状态：0下架 1上架
     */
    private Integer state =0;
//    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")

    @JsonFormat(pattern ="yyyy-MM-dd",timezone ="GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern ="yyyy-MM-dd",timezone ="GMT+8")
    private Date onsaletime;
    @JsonFormat(pattern ="yyyy-MM-dd",timezone ="GMT+8")
    private Date createtime = new Date();
    /**
     * 店铺Id 如果被领养店铺id为null
     */
    private Long shopId;
    /**
     * 如果被领养为领养用户id
     */
    private Long userId;
    private Long searchMasterMsgId;

    /**
     * 查询种类
     * 从类型实体类中查询
     */
    private PetType typeName;
//
    private Shop shopName;
    private User userName;

    private PetDetail petDetail;
//    //对象PetType
//    @JsonInclude(JsonInclude.Include.NON_EMPTY)
//    private List<PetType> children = new ArrayList<PetType>();

}
